#include<iostream>
#include<conio.h>
#include<stdio.h>
using namespace std;
class CRectangle
{
	int width;
	int height;
public:
	void setvaluse(int,int);
	int area();
};
void CRectangle::setvaluse(int a,int b)
{
	width=a;
	height=b;
}
int CRectangle::area()
{
	return(width*height);
}
int main()
{
	CRectangle recta;
	recta.setvaluse(3,4);
	CRectangle *rectb;
	rectb=&recta;
	rectb->setvaluse(3,9);
	cout<<"area a: "<<recta.area();
	cout<<"\narea b: "<<rectb->area();
	CRectangle *rectc=new CRectangle();
	rectc->setvaluse(5,6);
	rectb=rectc;
	rectc->setvaluse(7,8);
	cout<<"\narea b: "<<rectb->area();
	cout<<"\narea c: "<<rectc->area();
	getch();
	delete rectc;
	return 0;
}